import type { VxeGridProps } from '#/adapter/vxe-table'
import { SaleOrderImportStatusOptions } from '#/config/options/saleOrder'
import { $t } from '@vben/locales'

// 列表表头
export const columns: VxeGridProps['columns'] = [
    { field: 'moduleName', title: $t('components.ImportModalRecord.children.importFile') },
    { field: 'startTime', title: $t('components.ImportModalRecord.children.importTime') },
    { field: 'createUserName', title: $t('components.ImportModalRecord.children.importUser') },
    {
        field: 'status',
        title: $t('components.ImportModalRecord.children.importStatus'),
        width: 200,
        cellRender: {
            name: 'OptionsText',
            props: {
                options: SaleOrderImportStatusOptions
            }
        }
    },

    {
        field: 'action',
        title: $t('common.action'),
        width: 120,
        fixed: 'right',
        slots: { default: 'action' }
    }
]

export const formSchema = [
    {
        fieldName: 'createTime',
        label: $t('components.ImportModalRecord.children.importTime'),
        component: 'RangePicker'
    },
    {
        fieldName: 'status',
        label: $t('components.ImportModalRecord.children.importStatus'),
        component: 'Select',
        componentProps: {
            options: SaleOrderImportStatusOptions
        }
    }
]
